#include "webserver_epoll_ET.hpp"

int main(int argc, char* args[])
{
    if (argc != 2)
    {
        auto it = [args]{printf("请输入port\n");};
        it();
        exit(-1);
    }
    #ifndef Simple_logger
    // 0.初始化日志系统
    auto it = define_log::InitOverAllLogger();
    #endif

    //1.启动线程池
    ThreadPool<Thread_Task*>* st = ThreadPool<Thread_Task*>::Get_Instance(); //加载
    st->Run();  //线程池启动

    //2.启动web服务器
    std::unique_ptr<webserver> tmp(new webserver());
    tmp->initial(atoi(args[1]), st);
    tmp->work_begin();

    return 0;
}






